from .lighting import Lighting


class IoViewController:
    def __init__(self):
        # self.lighting_manager = Lighting.single_instance()
        self.lighting_manager = Lighting()
        self.is_light_open = False

    def lighting_button_click(self):

        if self.is_light_open:
            self.is_light_open = False
            self.lighting_manager.close()
        else:
            self.is_light_open = True
            self.lighting_manager.open()
